package org.feifei.pet.service;

import org.feifei.basic.service.BaseService;
import org.feifei.basic.util.PageList;
import org.feifei.pet.domain.Pet;
import org.feifei.pet.domain.SearchMasterMsg;
import org.feifei.pet.query.SearchMasterMsgQuery;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
 * Service接口:SearchMasterMsgService
 */
public interface SearchMasterMsgService extends BaseService<SearchMasterMsg> {

    List<SearchMasterMsg> getAll();

    /**
     * 将发布的宠物信息，存储的数据库
     * @param msg
     * @param request
     */
    void pushlish(SearchMasterMsg msg, HttpServletRequest request);

    /**
     * 管理员查看待处理的消息
     * @param query
     * @param request
     * @return
     */
    PageList<List<SearchMasterMsg>> pending(SearchMasterMsgQuery query, HttpServletRequest request);

    /**
     * 管理员查看已经处理的消息
     * @param query
     * @param request
     * @return
     */
    PageList<List<SearchMasterMsg>> processed(SearchMasterMsgQuery query, HttpServletRequest request);

    /**
     * 用户查看所有的消息
     * @param query
     * @param request
     * @return
     */
    PageList<List<SearchMasterMsg>> user(SearchMasterMsgQuery query, HttpServletRequest request);

    /**
     * 处理宠物寻主消息，需要将宠物的信息保存，然后将宠物寻主消息保存
     * @param pet
     * @param request
     */
    void handle(Pet pet, HttpServletRequest request);
}
